﻿namespace Ranger.App;

public static class StringExtensions
{
    internal static string SubstringAtIndexes(this string str, int startIndex, int endIndex)
        => str.Substring(startIndex, endIndex - startIndex);
    public static string CodePath
    {
        get
        {
            var directory = AppContext.BaseDirectory.Split(Path.DirectorySeparatorChar);
            var slice = new ArraySegment<string>(directory, 0, directory.Length - 4);
            return Path.Combine(slice.ToArray());
        }
    }
}